Writing Sphinx Extensions
https://www.sphinx-doc.org/ja/master/development/index.html
#Sphinx拡張開発
ビルダー
https://www.sphinx-doc.org/ja/master/development/builders.html#discover-builders-by-entry-point
Sphinx 用語集 ビルダー
builder 拡張は entry points を使って検出することができますので、 extensions 設定値にリストする必要はありません。
code:setup.py
setup(
# ...
entry_points={
'sphinx.builders': [
'mybuilder = my.extension.module',
],
}
)
Builder extensions should define an entry point in the sphinx.builders group.
The name of the entry point needs to match your builder's name attribute, which is the name passed to the sphinx-build -b option.
この場合でも、拡張の setup() 関数の add_builder() を使用してビルダーを登録する必要があることに注意してください。
IMO:sphinx-revealjsはビルダーの例? であれば、entry_pointsを指定できるのかも
テーマ
https://www.sphinx-doc.org/ja/master/development/theming.html#distribute-your-theme-as-a-python-package
code:setup.py
setup(
...
entry_points = {
'sphinx.html_themes': [
'name_of_theme = your_package',
]
},
...
)
例:Sphinx Alabasterテーマ
https://github.com/sphinx-doc/alabaster/blob/7a9df17b6366c96baba6bf5e14f9b6ff6bf7defa/pyproject.toml#L49-L50